#include <iostream>
using namespace std;

int N;
void solve();

int main() {
    cin >> N;
    solve();
    return 0;
}

void solve() {
    int x = 0;
    while (N) {
        int single = N % 10;
        N /= 10;
        x = x * 10 + single;
    }
    cout << x << endl;
}